package cn.iocoder.yudao.module.system.controller.app.price;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.dal.dataobject.price.LivePriceConfDO;
import cn.iocoder.yudao.module.system.service.price.LivePriceConfService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.annotation.security.PermitAll;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;


@Tag(name = "用户app - 实时价格配置")
@RestController
@RequestMapping("/system/live-price-conf")
public class AppLivePriceConfController {

    @Resource
    private LivePriceConfService livePriceConfService;

    @GetMapping("/list")
    @Operation(summary = "获得实时价格配置分页")
    @PermitAll
    public CommonResult<List<LivePriceConfDO>> getLivePriceConfList() {
        return success(livePriceConfService.getLivePriceConfList());
    }
}